import {App, defineAsyncComponent} from 'vue'
// 默认一个文件夹文件自动注册全局组件
const _AllGlob = import.meta.glob("./*.vue", {eager: true});


export default function AutoComponents(app: App) {

    const _Model_All = Object.values(_AllGlob);

    for (let key of _Model_All) {
        // @ts-ignore
        const _component = defineAsyncComponent(key);
        app.component(_component.name, _component);
    }
}